package com.polidea.rxohosble2.internal.connection;


import com.polidea.rxohosble2.internal.BleIllegalOperationException;
import com.polidea.rxohosble2.internal.BluetoothGattCharacteristicProperty;
import com.polidea.rxohosble2.annotation.Nullable;
import ohos.bluetooth.ble.GattCharacteristic;

/**
 * Handler for {@link IllegalOperationChecker#checkAnyPropertyMatches(GattCharacteristic, int)} response.
 */
public abstract class IllegalOperationHandler {

    protected final IllegalOperationMessageCreator messageCreator;

    IllegalOperationHandler(IllegalOperationMessageCreator messageCreator) {
        this.messageCreator = messageCreator;
    }

    public abstract @Nullable
    BleIllegalOperationException handleMismatchData(GattCharacteristic characteristic,
                                                    @BluetoothGattCharacteristicProperty int neededProperties);
}
